Repository navigation
fix(internet)!: keep MH option 6 prefixes with host bits and option 27 times past 9999 (#2702) - #2709
Conversation
|
GOOD TO GO at
One small follow-up goes into this PR: Home Network Prefix (option 22) still refuses a prefix length past 128, where MNP now keeps it. It gets the same wire-width rule. The body is updated for the |
c8e3e0e to
adec521
Compare
|
Pushed |
|
NEEDS CHANGES at
The review missed it because it only ran the internet tests, and this test lives in the misc tests. |
…7 times past 9999 (#2702) - The Mobile Network Prefix option fused its prefix and length into an IPv6Network, so a prefix with bits set past its length, or a length past 128, raised a bare ValueError. RFC 3963 section 6.2 reads both fields as given and answers a prefix it cannot use with a status, not a discard, so the data model keeps them apart, as Home Network Prefix does: prefix_length is a new required field and prefix is the IPv6Address captured, the breaking change. The maker checks the length against its 8-bit field alone, takes a prefix_length keyword, and writes the bits past it. - The Home Network Prefix option refused a length past 128 to read and to make. RFC 5213 section 5.3.2 answers a prefix it cannot authorise with a status, so both take the 8-bit field's width, as option 6 does. - The Timestamp option turned a 48-bit second count past 9999 into a datetime, which raised a bare ValueError. RFC 5213 section 5.5 has the LMA answer such a time with a status rather than discard it, so timestamp is None there and pmip_timestamp keeps it. The seconds and fraction are no longer summed as one float, which carried 23:59:59 and 65535/65536 past the year's end. - The mutation sweep's known crashes and the maker sweep's unparsed maximum go, and the Windows-range test reads a time past 9999 as Linux does, not raising. New tests fail on 57a6c36 without the pcapkit/ change; MH and guard modules pass.
|
Fold pushed:
Since only a test changed after the reviewed head, the verdict is GOOD TO GO. |
adec521 to
0dc9a95
Compare
… helpers, MH options 6 and 27, the cut SCTP and option-area schemas and dict-built secrets into 1.6.0 (#2449) - Breaking: a make() enumeration field takes a member or an int, its X_default/X_namespace/X_reversed keywords removed with no alias, and names, wide codes and wide option codes are refused (#2692); the schema helpers move to pcapkit.corekit.schema and pcapkit.corekit.fields.byteorder is removed (#2704); MobileNetworkPrefixOption gains prefix_length and keeps an IPv6Address prefix, and TimestampOption's timestamp is None past 9999 (#2709). Folded into the MH data-model entry; old values measured against v1.5.1. - Fixed: the SCTP schema cut inside its padding and a header schema cut inside an option area pack back as captured (#2682), into the SCTP entry; a Decryption Secrets Block rebuilds from its dict as captured (#2707), into the DSB entry. - Folded into unreleased entries: FRAD's Q.922 address refusal and quiet cut rebuild (#2719); a from_data rebuild's checksum status (#2712); a failed ListField fill's ledger (#2706); pad_length's path (#2704); TLS's enumeration fields (#2692); the make() and schema-helper rulings, into the conventions entry (#2692, #2704); the GraalPy shards, into the CI-legs entry (#2720). - 1.5.0's corekit.fields.byteorder role points at corekit.schema.byteorder, where #2704 moved it, so the nitpicky build does not warn on it; 1.5.0's text unchanged. - No entry for the test-only 72b2bd8 (#2715), or the docs-and-test-only 0c07940 (#2718). - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Two MH mobility options raised a bare
ValueErrorwhen parsed on their own. Neither RFC has the receiver discard these values, so both now keep what they parse:prefixis the capturedIPv6Address, with a newprefix_lengthfield, the same shape as its sibling Home Network Prefix. A prefix with host bits set, and a prefix length past 128, now parse and rebuild._make_opt_mnpchecks the prefix length against its 8-bit field only, and still takes the network forms.timestampisNonepast the year 9999, andpmip_timestampkeeps the raw value. The reader no longer adds seconds and fraction as one float, which raised at the last second of 9999 and drifted by up to about 15 µs above 2^36 seconds.Breaking: the MNP data model changes:
prefixis an address, andprefix_lengthis a new required field. The Timestamp'stimestampbecomesOptional._make_opt_mnpalso takes anintprefix.The new tests cover standalone parse, parsing inside IPv6 (quiet),
from_datafrom info and fromto_dict(), andmake(), at the edge values. They fail onmain.Closes #2702